package com.itheima.stock;

import com.google.common.collect.Lists;
import com.itheima.stock.mapper.StockBusinessMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;
import java.util.stream.Collectors;

@SpringBootTest
public class Tmapper {

    @Autowired
    private StockBusinessMapper stockBusinessMapper;

    @Test
    public void t2() {
        List<String> business = stockBusinessMapper.getAllStockBusiness();
        business = business.stream().map(code -> code.startsWith("6") ? "sh" + code : "sz" + code).collect(Collectors.toList());
        Lists.partition(business,15).forEach(System.out::println);
    }


}
